wget https://get.helm.sh/helm-v3.12.3-linux-amd64.tar.gz
tar -xvzf helm-v3.12.3-linux-amd64.tar.gz
mv linux-amd64/helm /usr/bin/
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
helm repo ls >> /dev/null

echo "请把这条命令放到worker节点执行并放好镜像"
docker load -i dashboard-v2.7.0

helm upgrade --install kubernetes-dashboard  -f kubernetes-dashboard/values.yaml    kubernetes-dashboard-6.0.8.tgz  --create-namespace --namespace kubernetes-dashboard

kubectl apply -f deploy.yaml
kubectl apply -f 01-admin-user-sa.yaml
kubectl apply -f 02-admin-user-bind.yaml
kubectl apply -f 03-sa-secret.yaml

cd ui.xxhf.cc_nginx
kubectl -n kubernetes-dashboard \
  create secret tls kubernetes-dashboard-tls \
  --cert=ui.xxhf.cc_bundle.crt \
  --key=ui.xxhf.cc.key

helm upgrade --install kubernetes-dashboard  -f kubernetes-dashboard/values.yaml     kubernetes-dashboard  --create-namespace --namespace kubernetes-dashboard

echo "用这个kubectl  -n kubernetes-dashboard  edit  svc kubernetes-dashboard改成NodePort"
echo "kubectl get secret admin-user -n kubernetes-dashboard -o jsonpath={".data.token"} | base64 -d #查看token"
echo "kubectl  -n kubernetes-dashboard  get svc #查看端口"